@extends('admin.layout')
@section('title','专家列表')
@section('content')
    <div class="col-md-12" id="content" >
        <div class="app_content_div" id="app_content_div_301Index">
            <h3>专家列表</h3>
        </div>
        <div style="float:right;"><button type="button" class="btn btn-primary" onclick="window.location.href='/adm/expert/add-expert'">新增专家</button></div>
        <table class="table table-striped">
            <thead>
            <tr>
                <th>id</th>
                <th>姓名</th>
                <th>职称</th>
                <th>科室</th>
                <th>医院</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            @foreach($oExperts as $v)
            <tr>
                <th scope="row">{{$v->id}}</th>
                <td>{{$v->name}}</td>
                <td>{{$v->job_name}}</td>
                <td>{{$v->department}}</td>
                <td>{{$v->hospital}}</td>
                <td>
                    <a href="/adm/expert/edit-expert/{{$v->id}}"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></a>
                    &nbsp;&nbsp;&nbsp;
                    <a onclick="delUser('/adm/expert/delete-expert/{{$v->id}}')" ><span class="glyphicon glyphicon-trash" aria-hidden="true"></span></a>
                </td>
            </tr>
            @endforeach
            </tbody>
        </table>
        <script>
            function delUser(url){
                if(confirm('确定要删除该专家吗？')){
                    window.location.href = url;
                }
            }
        </script>
    </div>
@endsection
